home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 12 / 012.d81 / dragon's riddles (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  298 lines

  1. 0 gosub60000
  2. 1 rem * the dragon's 7 riddles *
  3. 2 rem * by meredith jones frummer &             thomas f. trocco, 12/83
  4. 5 rem *
  5. 6 goto200
  6. 10 :
  7. 20 :
  8. 30 :
  9. 40 :
  10. 50 :
  11. 60 :
  12. 70 :
  13. 80 :
  14. 90 :
  15. 100 :
  16. 200 poke53280,7:poke53281,7
  17. 220 zz=20:gosub1340:print""
  18. 240 print"[217]ou are walking alone in an enchanted   forest when you are captured";
  19. 260 print" by an evil dragon named [195][200][210][217][211][207][208][200][217][204][193][216][146]."
  20. 280 print" [212]he dragon will ask you seven riddles  with 20 chances to answer.";
  21. 300 print" [201]f you answerall 7 correctly before your chances are up, you";
  22. 320 print" will escape with the  dragon's  treasure.
  23. 340 [153][166]9)"press stopreturnwait to go on
  24. 360 geta$:ifa$<>chr$(13)then360
  25. 380 gosub1340:print"[201]f you lose...":print"[195][200][210][217][211][207][208][200][217][204][193][216][146] eats you!
  26. 400 [153]"(NULL)hen lenleft$(NULL)(NULL)(NULL)(NULL)(NULL)left$(NULL)(NULL)atn(NULL)wait asks you for an answertype in your answer";
  27. 420 [153]" and hit stopreturnwait.
  28. 440 print"[196]on't use 'a','an', or 'the' in your    answers: chrysophylax[146]";
  29. 460 print" isn't very smart!!
  30. 480 [153][166]8)"press stopreturnwait to play.
  31. 500 geta$:ifa$<>chr$(13)then500
  32. 520 gosub1340:print"            [205]y first riddle!
  33. 540 [153]"(NULL)ou can bend it, but  it's made from    trees.
  34. 560 input"[201]t is";a1$
  35. 580 ifa1$=chr$(80)+chr$(65)+chr$(80)+chr$(69)+chr$(82)thengosub1540:gosub1400:goto620
  36. 600 gosub1720:zz=zz-1:gosub1400:goto520
  37. 620 gosub1340:print"            [205]y second riddle!!
  38. 640 [153]"right$t can wear rock down, but it comes fromrock itself.
  39. 660 input"[201]t is";a2$
  40. 680 ifa2$=chr$(83)+chr$(65)+chr$(78)+chr$(68)thengosub1540:gosub1400:goto720
  41. 700 gosub1720:zz=zz-1:gosub1400:goto620
  42. 720 gosub1340:print"            [205]y third riddle!!!
  43. 740 [153]"atnnimals and people breathe in what      'they' breathe out."
  44. 760 [133]"(NULL)hat are 'they'";a3$
  45. 780 [139]a3$[178][199](80)[170][199](76)[170][199](65)[170][199](78)[170][199](84)[170][199](83)[167][141]1540:[141]1400:[137]820
  46. 800 [141]1720:zz[178]zz[171]1:[141]1400:[137]720
  47. 820 [141]1340:[153]"          (NULL)y fourth riddle!!!!
  48. 840 print"[215]hat walks on four feet in the morning, two feet during the ";
  49. 860 print"day, and three feet at night"
  50. 880 input"";a4$
  51. 900 ifa4$=chr$(77)+chr$(65)+chr$(78)thengosub1540:gosub1400:goto980
  52. 920 ifa4$=chr$(80)+chr$(69)+chr$(79)+chr$(80)+chr$(76)+chr$(69)thengosub1540:gosub1400:goto980
  53. 940 ifa4$=chr$(72)+chr$(85)+chr$(77)+chr$(65)+chr$(78)+chr$(83)thengosub1540:gosub1400:goto980
  54. 960 gosub1720:zz=zz-1:gosub1400:goto820
  55. 980 gosub1340:print"            [205]y fifth riddle!!!!!
  56. 1000 [153]"(NULL)hat can you feel that you can't touch"
  57. 1020 [133]"";a5$
  58. 1040 [139]a5$[178][199](72)[170][199](85)[170][199](78)[170][199](71)[170][199](69)[170][199](82)[167][141]1540:[141]1400:[137]1120
  59. 1060 [139]a5$[178][199](67)[170][199](79)[170][199](76)[170][199](68)[167][141]1540:[141]1400:[137]1120
  60. 1080 [139]a5$[178][199](80)[170][199](65)[170][199](73)[170][199](78)[167][141]1540:[141]1400:[137]1120
  61. 1100 [141]1720:zz[178]zz[171]1:[141]1400:[137]980
  62. 1120 [141]1340:[153]"           (NULL)y sixth riddle!!!"
  63. 1140 [153]"(NULL)hat falls without breaking?"
  64. 1160 [133]"";a6$
  65. 1180 [139]a6$[178][199](82)[170][199](65)[170][199](73)[170][199](78)[167][141]1540:[141]1400:[137]1220
  66. 1200 [141]1720:zz[178]zz[171]1:[141]1400:[137]1120
  67. 1220 [141]1340:[153]"           (NULL)y last riddle!!!"
  68. 1240 [153]"(NULL)hat has no beginning and no end?"
  69. 1260 [133]"";a7$
  70. 1280 [139]a7$[178][199](67)[170][199](73)[170][199](82)[170][199](67)[170][199](76)[170][199](69)[167][137]2140
  71. 1300 [139]a7$[178][199](82)[170][199](76)[170][199](78)[170][199](71)[167][137]2140
  72. 1320 [141]1720:zz[178]zz[171]1:[141]1400:[137]1220
  73. 1340 [143]        *** title subroutine ***
  74. 1350 [153]"load"[166]9)"                      "
  75. 1360 [153][166]9)"  the dragon's seven  "
  76. 1370 [153][166]9)"       riddles        "
  77. 1380 [153][166]9)"                      ":[142]
  78. 1400 [143] *** # of guesses subroutine ***
  79. 1410 [153]""[163]255)[163]110)
  80. 1420 [139]zz[178]1[167][153]"   (NULL)ou have only one guess remaining!!"
  81. 1440 [139]zz[178]0[167][137]1960
  82. 1460 [139]zz[179][177]1[167][153]"     (NULL)ou have";zz;"guesses remaining."
  83. 1480 [153][166]8)"press stopreturnwait to go ononon
  84. 1500 geta$:ifa$<>chr$(13)then1500
  85. 1520 return
  86. 1540 rem *correct ans. sound subroutine*
  87. 1550 print"            [212]hat's correct!!"
  88. 1560 poke54276,17:fora=15to0step-1:poke54296,a:poke54273,86:forb=1to25:nextb,a
  89. 1570 poke54276,8:poke54296,15
  90. 1580 poke54276,0:poke54296,0:poke54273,0
  91. 1590 return
  92. 1720 rem *wrong answer sound subroutine*
  93. 1730 print"           [212]hat's incorrect!!"
  94. 1740 poke54296,15
  95. 1750 fort=1to15:poke54287,20:poke54290,8:poke54290,129:poke54290,128:next
  96. 1760 poke54296,0
  97. 1765 s=54272:fore=stos+28:pokee,0:next
  98. 1770 return
  99. 1960 rem *game end explosion subroutine*
  100. 1970 print"[147][217]ou have been eaten!!!"
  101. 1980 poke54276,15:poke54276,129:poke54273,91:ford=15to0step-1:poke54296,d
  102. 1990 poke53281,1:poke53280,2:fore=1to70:next:poke53280,e:next
  103. 2000 poke54276,0:poke54296,0:poke53280,7:poke53281,7
  104. 2060 print"[208]lay again (y/n)?"
  105. 2080 geta$:ifa$="[217]"thenrestore:run
  106. 2100 ifa$="n"thenprint"[147]":poke53280,6:poke53281,14:goto63000
  107. 2110 geta$:ifa$="y"thenrestore:run
  108. 2120 goto2080
  109. 2140 print"[147]"spc(8);" [217]ou have beaten the"
  110. 2141 printspc(8)"                    "
  111. 2145 printspc(8)" dragon and have won"
  112. 2146 printspc(8)"                    "
  113. 2147 printspc(8)"its magic music box!"
  114. 2150 gosub21700
  115. 2260 print"[208]lay again (y/n)?"
  116. 2280 geta$:ifa$="y"thenrestore:run
  117. 2300 ifa$="n"thenprint"[147]":poke53280,6:poke53281,14:goto63000
  118. 2320 goto2280
  119. 21700 rem *** swan lake subroutine ***
  120. 21701 fr=3520:rem *note 'a' in top oct*
  121. 21702 co=2^(1/12)
  122. 21703 fori=1to9:fr=fr/co:next
  123. 21704 ss=16777216
  124. 21705 cs=1022730
  125. 21706 fc=ss/cs
  126. 21707 dimf(7,11)
  127. 21708 fori=0to11
  128. 21709 s=fr*fc
  129. 21710 forj=7to0step-1:f(j,i)=s:s=s/2
  130. 21711 next
  131. 21712 fr=fr*co
  132. 21713 next
  133. 21714 sid=54272
  134. 21715 voice=0:oct=3:wave=32
  135. 21716 vm=7:hi=256
  136. 21717 fori=0to23:pokesid+i,0:next
  137. 21718 pokesid+24,15+16
  138. 21719 reada,d,s,r,pw,c,re
  139. 21720 fori=0to2:index=sid+i*vm
  140. 21721 pokeindex+5,a*16+d
  141. 21722 pokeindex+6,s*16+r
  142. 21723 pokeindex+2,pwand 255
  143. 21724 next
  144. 21725 data0,10,0,0,800,2000,15
  145. 21726 pokesid+23,7+re*16
  146. 21727 ch=int(c/8):cl=c-ch*8
  147. 21728 pokesid+21,cl:pokesid+22,ch
  148. 21729 pokeindex+3,pw/hi
  149. 21730 readtempo
  150. 21731 readoct,sem,dur:ifoct<0goto21740:rem  ***  read note and exit if end  ***
  151. 21732 frq=f(oct,sem)
  152. 21733 fh=int(frq/hi):fl=frq-fh*hi
  153. 21734 index=sid+voice*vm
  154. 21735 pokeindex,fl:pokeindex+1,fh
  155. 21736 pokeindex+4,wave:pokeindex+4,wave+1
  156. 21737 voice=voice+1:ifvoice>2thenvoice=0
  157. 21738 fori=1todur*tempo:next
  158. 21739 goto21731
  159. 21740 fori=1to1000:next
  160. 21741 pokesid+24,0:return
  161. 21742 data80:rem *** tempo ***
  162. 21743 rem                *** measure 1 ***
  163. 21744 data5,2,8
  164. 21745 data4,7,2
  165. 21746 data4,9,2
  166. 21747 data4,10,2
  167. 21748 data5,0,2
  168. 21749 rem                *** measure 2 ***
  169. 21750 data5,2,6
  170. 21751 data4,10,2
  171. 21752 data5,2,6
  172. 21753 data4,10,2
  173. 21754 rem                *** measure 3 ***
  174. 21755 data5,2,6
  175. 21756 data4,7 ,2
  176. 21757 data4,10,2
  177. 21758 data4,7 ,2
  178. 21759 data4,3 ,2
  179. 21760 data4,10,2
  180. 21761 rem                *** measure 4 ***
  181. 21762 data4,7,10
  182. 21763 data5,0,2
  183. 21764 data4,10,2
  184. 21765 data4,9,2
  185. 21766 rem                *** measure 5 ***
  186. 21767 data5,2,8
  187. 21768 data4,7,2
  188. 21769 data4,9,2
  189. 21770 data4,10,2
  190. 21771 data5,0,2
  191. 21772 rem                *** measure 6 ***
  192. 21773 data5,2,6
  193. 21774 data4,10,2
  194. 21775 data5,2,6
  195. 21776 data4,10,2
  196. 21777 rem                *** measure 7 ***
  197. 21778 data5,2,6
  198. 21779 data4,7 ,2
  199. 21780 data4,10,2
  200. 21781 data4,7 ,2
  201. 21782 data4,3 ,2
  202. 21783 data4,10,2
  203. 21784 rem                *** measure 8 ***
  204. 21785 data4,7,12
  205. 21786 data4,7 ,4
  206. 21787 rem                *** measure 9 ***
  207. 21788 data4,9 ,4
  208. 21789 data4,10,4
  209. 21790 data5,0,4
  210. 21791 data5,2 ,2
  211. 21792 data5,3 ,2
  212. 21793 rem               *** measure 10 ***
  213. 21794 data5,5,6
  214. 21795 data5,3,2
  215. 21796 data5,2,4
  216. 21797 data5,3 ,2
  217. 21798 data5,5 ,2
  218. 21799 rem               *** measure 11 ***
  219. 21800 data5,7,6
  220. 21801 data5,5,2
  221. 21802 data5,3,4
  222. 21803 data5,5